execute store result score #index temp run data get entity @n[type=marker,tag=VoidShop,distance=..10] data.LastSlotIndex
execute store result storage vs:system temp.VSPB.start_index int 1 run scoreboard players add #index temp 1

execute store result score #success temp run function vs:system/game_ctrol/void_shop/page_button/index_is_exist with storage vs:system temp.VSPB
execute if score #success temp matches 1 run function vs:system/game_ctrol/void_shop/slot/read_items/start with storage vs:system temp.VSPB
execute if score #success temp matches 0 run function vs:system/game_ctrol/void_shop/slot/read_items/start {start_index:0}

playsound minecraft:block.note_block.xylophone master @a ~ ~ ~ 0.85 1.0

data remove storage vs:system temp.VSPB
scoreboard players reset #index temp
scoreboard players reset #success temp
data remove entity @n[tag=VoidShop.PBInteraction,distance=..1,type=interaction] interaction